package cn.wolfcode.qo;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.util.UserContext;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter@Setter
public class NoticeQueryObject extends QueryObject {
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date startTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date endTime;
    private Integer level;
    private Integer readed;
    public Long getCurrentUserId(){
        Employee currentUser = UserContext.getCurrentUser();
        return currentUser.getId();
    }
}
